/* admin.css - 管理后台专用样式 */
/* 基础变量 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
}

/* 布局结构 */
.admin-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    background-color: var(--background-color);
}

.admin-sidebar {
    background: var(--primary-color);
    color: white;
    /*padding: 1.5rem;*/
}

.admin-profile {
    text-align: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.profile-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 导航菜单 */
.admin-menu ul {
    list-style: none;
    margin-bottom: 1rem;
}

.menu-item {
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.menu-item:hover {

    background: var(--secondary-color);
}
.submenu {
    max-height: 0;
    transition: max-height 0.3s ease-out;
    padding-left: 1.5rem;
    list-style: none;
    margin-top: 0.5rem;
    animation: slideDown 0.3s ease;
    display: none;
}
.submenu.active {
    max-height: 100px; /* 根据实际内容调整 */
    transition: max-height 0.5s ease-in;
    display: block;

}

.submenu li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
}


.submenu li:hover {
    background: var(--secondary-color);       /* 主色调 */
    color: white;             /* 文字反白 */
    transform: translateX(5px); /* 右移动画 */
    transition: all 0.3s ease;  /* 平滑过渡 */
}
.submenu li:hover::after {
    content: "→";
    margin-left: 8px;
    color: var(--primary-color);
}
.fa-book-open {
    transition: transform 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section.active {
    /*display: block;*/
    animation: fadeIn 0.3s ease;
}

/* 主内容区 */
.admin-main {
    padding: 2rem;
    margin-left: var(--sidebar-width);
}
.content-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: var(--primary-color);
    color: white;
}

/* 角色标签 */
.role-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9em;
}

.role-tag.admin { background: var(--primary-color); color: white; }
.role-tag.teacher { background: #f39c12; color: white; }
.role-tag.student { background: var(--success-color); color: white; }

/* 表单元素 */
.form-vertical .form-group {
    margin-bottom: 1.5rem;
}

.form-vertical label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    outline: none;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 0.5rem;
    margin: 0 0.25rem;
    cursor: pointer;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 删除课程操作样式 */
.danger-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.danger-header {
    background: var(--secondary-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.danger-header i {
    font-size: 1.8rem;
}

.warning-alert {
    background: #fdecea;
    border-left: 4px solid #e74c3c;;
    padding: 1rem;
    margin: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 4px;
}

.warning-alert i {
    color: #e74c3c;
    font-size: 1.5rem;
}

/* 危险表格样式 */
.danger-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.danger-table th {
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    text-align: left;
}

.danger-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.danger-table tr:hover {
    background: #fce9e7;
}

/* 删除按钮样式 */
.btn-delete {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-delete:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* 批量删除面板 */
.batch-delete {
    border-top: 2px dashed var(--secondary-color);
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-select-all {
    background: none;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-batch-delete {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.btn-batch-delete:not([disabled]) {
    background: var(--secondary-color);
    cursor: pointer;
}

/* 课程修改模块 */
.edit-course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.edit-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.edit-header h3 {
    margin-right: auto;
}

.btn-save-draft {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-save-draft:hover {
    background: rgba(255,255,255,0.25);
}

/* 多步骤表单 */
.form-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    color: #95a5a6;
    border-bottom: 3px solid #ecf0f1;
    cursor: not-allowed;
    position: relative;
}

.step.active {
    color: #3498db;
    border-color: #3498db;
    cursor: pointer;
}

.form-step {
    display: none;
    padding: 0 2rem;
}

.form-step.active {
    display: block;
}

/* 表单网格布局 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* 时间选择块 */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.time-slot {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-slot.checked {
    border-color: #3498db;
    background: #e3f2fd;
}

/* 教师选择器 */
.teacher-selector {
    position: relative;
}

.selected-teacher {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #3498db;
    border-radius: 8px;
    cursor: pointer;
}

.teacher-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.teacher-list {
    position: absolute;
    width: 100%;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 1rem;
    z-index: 1000;
    display: none;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem;
    border-top: 1px solid #eee;
}

.btn-prev-step,
.btn-next-step {
    background: none;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-submit {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
}

.btn-prev-step:hover,
.btn-next-step:hover {
    background: #3498db;
    color: white;
}

/* 新增课程模块 */
.creation-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.creation-header {
    background: var(--secondary-color);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.creation-header h3 {
    margin-right: auto;
    font-weight: 500;
}

.header-tips {
    font-size: 0.9em;
    opacity: 0.9;
}

/* 高级表单布局 */
.advanced-course-form {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 输入组增强样式 */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
}

.input-with-icon input {
    padding-left: 3rem !important;
}

/* 班级标签输入 */
.class-tags {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 0.5rem;
}

.tag-input {
    display: flex;
    gap: 0.5rem;
}

.tag-search {
    flex: 1;
    border: none !important;
    padding: 0.8rem !important;
}

.btn-add-tag {
    background: var(--secondary-color);
    color: white;
    border: none;
    width: 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-tag:hover {
    background: var(--secondary-color);
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* 表单操作按钮 */
.form-actions {
    border-top: 1px solid #eee;
    padding-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-reset {
    background: #f8f9fa;
    color: #95a5a6;
    border: 2px solid #eee;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #eee;
}

.btn-submit {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.2);
}



/*课程管理*/

/* 在Admin.css中添加以下样式 */
/* 考勤方式选择 */
.attendance-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.method-card {
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.method-card.active {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.1);
}

.method-card i {
    font-size: 2rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.method-card.active i {
    color: #2ecc71;
}

/* 班级标签系统 */
.class-tags {
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    padding: 0.8rem;
}

.tag-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag-search {
    flex: 1;
    border: none;
    padding: 0.8rem !important;
    background: transparent;
}

.btn-add-tag {
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    width: 40px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-tag:hover {
    background: #27ae60;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background: #f0f0f0;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: tagAppear 0.3s ease;
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 字符计数器 */
.char-counter {
    text-align: right;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 课程选择器 */
.course-selector {
    position: relative;
}

.selected-course {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.selected-course:hover {
    border-color: #2ecc71;
}

.course-list {
    position: absolute;
    width: 100%;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.course-item {
    padding: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.course-item:hover {
    background: #f8f9fa;
}


/* 在Admin.css中添加以下样式 */
/* 修改单元管理 */
.header-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.status-label {
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.9em;
}

.status-label.active {
    background: #2ecc71;
    color: white;
}

.status-label.inactive {
    background: #e74c3c;
    color: white;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background: #ecf0f1;
    border-radius: 13px;
    transition: all 0.3s;
    cursor: pointer;
}

.switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#unitStatus:checked + .switch {
    background: #2ecc71;
}

#unitStatus:checked + .switch::after {
    transform: translateX(24px);
}

/* 历史记录 */
.history-section {
    border-top: 2px solid #f8f9fa;
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 1rem;
}

.history-record {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.record-header {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 0.5rem;
}

.record-diff {
    background: white;
    border-radius: 6px;
    padding: 0.8rem;
}

.diff-item {
    padding: 0.3rem 0;
    font-size: 0.95em;
}

.field {
    color: #3498db;
    font-weight: 500;
}

.before {
    color: #e74c3c;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.after {
    color: #2ecc71;
    margin-left: 0.5rem;
}

/* 课程选择器增强 */
.course-item.selected {
    background: #3498db;
    color: white;
}

.course-item.selected .course-code {
    color: rgba(255,255,255,0.8);
}



/* 删除单元管理 */
.method-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method-tag.qr {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.method-tag.gps {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid #3498db;
}

.method-tag.code {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

/* 表格调整 */
.danger-table td {
    vertical-align: middle;
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.9em;
}

/* 复选框样式 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #e74c3c;
}

/*个人信息*/
.profile-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.profile-content {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    padding: 2rem;
}

.avatar-section {
    border-right: 2px solid #eee;
    padding-right: 2rem;
}

.avatar-upload {
    text-align: center;
}

.avatar-preview {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-upload {
    background: #3498db;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-upload:hover {
    background: #2980b9;
}

.info-group {
    margin-bottom: 2rem;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
}

.info-group h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.info-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
}

.info-grid dt {
    font-weight: 600;
    color: #7f8c8d;
}

.info-grid dd {
    color: #2c3e50;
    margin: 0;
}

.profile-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.profile-form input,
.profile-form select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.profile-form input:focus {
    border-color: #3498db;
    outline: none;
}

/* 现代模态框样式 */
.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
}

.modal-container {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    background: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

/* 动画输入框 */
.animated-input {
    position: relative;
    margin: 25px 15px;
}

.animated-input input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.animated-input label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    transition: all 0.3s ease;
}

.animated-input i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.animated-input input:focus,
.animated-input input:valid {
    border-color: #3498db;
    padding-top: 20px;
    padding-bottom: 10px;
}

.animated-input input:focus ~ label,
.animated-input input:valid ~ label {
    top: 10px;
    font-size: 0.8rem;
    color: #3498db;
}

/* 下拉选择样式 */
.select-wrapper {
    position: relative;
    margin: 25px 15px;
}

.select-wrapper label {
    display: block;
    margin-bottom: 8px;
    color: #666;
}

.select-wrapper select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    appearance: none;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 1rem center/1em;
}

/* 按钮样式 */
.form-actions {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
}

.btn-cancel:hover {
    background: #c0392b;
}

.btn-submit {
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    background: #2980b9;
}

/*课程管理*/
/* 组合式布局样式 */
.management-container {
    position: relative;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
}

.operation-tabs {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 2px solid #4e73df;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    background: #f8f9fc;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #4e73df;
    color: white;
}

.danger-actions {
    margin-left: auto;
    display: flex;
    gap: 1rem;
}

.combined-card {
    margin: 0;
    box-shadow: none;
    border: none;
}

.combined-card .card-header {
    background: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* 行内编辑样式 */
.editable {
    cursor: pointer;
    padding: 0.25rem;
    border-bottom: 1px dashed #858796;
}

.edit-input, .edit-select {
    width: 80%;
    padding: 0.25rem;
    display: none;
}

.btn-edit {
    padding: 0.25rem 0.5rem;
    background: #4e73df;
    color: white;
}

/* 响应式处理 */
@media (max-width: 768px) {
    .operation-tabs {
        flex-wrap: wrap;
    }

    .danger-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* course-data-table样式 */
.course-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin: 20px 0;
}

.course-row {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.course-data-table td {
    text-align: center; /* 新增 */
    padding: 16px 24px;
    vertical-align: middle;
}

.course-code {
    color: #2c3e50;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.course-name {
    color: #34495e;
    font-size: 16px;
    max-width: 200px;
}

.credit-badge {
    background: #e8f4ff;
    color: #3498db;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-block;
}

.course-teacher {
    color: #7f8c8d;
    font-size: 14px;
}

/* 操作按钮样式 */
.action-buttons {
    white-space: nowrap;
}

.btn {
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-edit {
    background: #f0f9ff;
    color: #3498db;
    border: 1px solid #3498db30;
}

.btn-edit:hover {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 8px #3498db40;
}

.btn-delete {
    background: #fff0f0;
    color: #e74c3c;
    border: 1px solid #e74c3c30;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
    box-shadow: 0 2px 8px #e74c3c40;
}

.btn i {
    font-size: 14px;
}

/* 新增课程模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 500px;
    margin: 50px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hint {
    color: #666;
    font-size: 0.9em;
}



/* 单元页面 */
.unit-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.unit-data-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.unit-data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

/* 行悬停效果 */
.unit-data-table tr:hover {
    background-color: #f8f9fa;
}

/* 省略号文本 */
.ellipsis {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 操作按钮容器 */
.unit-data-table td:last-child {
    min-width: 150px;
}

/* 按钮基础样式 */
.edit-unit-btn,
.delete-unit-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 编辑按钮样式 */
.edit-unit-btn {
    background-color: #4a9cff;
    color: white;
}

.edit-unit-btn:hover {
    background-color: #357abd;
}

/* 删除按钮样式 */
.delete-unit-btn {
    background-color: #ff6b6b;
    color: white;
}

.delete-unit-btn:hover {
    background-color: #cc5656;
}

/* 图标样式 */
.fa-edit,
.fa-trash {
    font-size: 14px;
}

/* 响应式处理 */
@media (max-width: 768px) {
    .unit-data-table {
        display: block;
        overflow-x: auto;
    }

    .unit-data-table td:last-child {
        min-width: auto;
    }
}

/*新增单元模态框*/
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 500px;
    margin: 2rem auto;
    padding: 20px;
    border-radius: 8px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
}




